package org.toonWatch

class Category {

//    int id
    String name
//    byte[] photo
    
    static constraints = {
        id(matches: '[0-9]{8}') //primary key
        name(blank:false, nullable:false, maxSize:50)
    }

    static hasMany = [items : Item]
    
    static mapping = {
 //       id generator:'assigned', params:[type:'int']
    }
    String toString() {
        name
    }
}


